Skip to content

Let the backend test job fail the run - #13827

Open
hysts wants to merge 1 commit into
mainfrom
fix/continue-on-error-hides-backend-failures
Open

Let the backend test job fail the run#13827
hysts wants to merge 1 commit into
mainfrom
fix/continue-on-error-hides-backend-failures

Conversation

@hysts

@hysts hysts commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Description

continue-on-error: true sat at the job level on the test matrix, so it covered all four combinations, including ubuntu-latest + not flaky. When that job failed, its own check run was recorded as failure, but the check suite and the workflow run both rolled up to success. The roll-up is what the commit list and gh run list show, so a red job appeared as a green tick.

This does not weaken the PR gate, and the change does not tighten it either: required status checks match on the check run name, and test-ubuntu-latest-not-flaky was already failure there. What was hidden is pushes to main, where there is no PR to gate. 19cb8f7bc is on main right now with a failing backend job and a green tick, and four test_load_assets failures reached main the same way until a release PR made them look like release breakage (#13697).

The matrix also covers test-type: flaky and windows-latest, both of which run only under a label and are expected to be unreliable, which is presumably what the setting was for. Scoping it to those keeps that intent and lets the combination everyone actually reads tell the truth.

Two checks behind the change, both done before proposing it:

  • Nothing downstream keys off this workflow's conclusion. Seven workflows gate on github.event.workflow_run.conclusion == 'success' and every one listens to a different workflow. The only one listening to python is update-checks.yml, which fires on completed regardless of conclusion and whose single job runs only when the python workflow did not run.
  • It will not turn main red for unrelated reasons. Job-level conclusions for the 17 most recent python runs on main (2026-08-24 to 2026-09-04): 11 green, 1 red, 5 that skipped the python tests entirely. The one red is the flakiness fixed by Fix flaky backend tests that build a bare TestClient #13824.

Best merged after #13824, so the first honest run is a green one.

Closes: #13826

AI Disclosure

We encourage the use of AI tooling in creating PRs, but the any non-trivial use of AI needs be disclosed. E.g. if you used Claude to write a first draft, you should mention that. Trivial tab-completion doesn't need to be disclosed. You should self-review all PRs, especially if they were generated with AI.

  • I used AI to... I used AI to investigate the root cause and implement the fix.
  • I did not use AI

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Testing and Formatting Your Code

  1. PRs will only be merged if tests pass on CI. We recommend at least running the backend tests locally, please set up your Gradio environment locally and run the backed tests: bash scripts/run_backend_tests.sh

  2. Please run these bash scripts to automatically format your code: bash scripts/format_backend.sh, and (if you made any changes to non-Python files) bash scripts/format_frontend.sh

continue-on-error sat at the job level, so it covered all four matrix
combinations, including ubuntu + not-flaky. A failing backend job was
recorded as failure on its own check run but the check suite and the
workflow run both rolled up to success, so the commit got a green tick
and only the individual entry in gh pr checks was red.

That does not weaken the PR gate, since required status checks read the
job's check run, which was already failure. What it hid was pushes to
main, where there is no PR to block: 19cb8f7 currently sits on main
with a failing backend job and a green tick.

Scoping it to the combinations that are expected to be unreliable keeps
the original intent. Nothing downstream keys off this workflow's
conclusion, and the only failure it would newly expose on main is the
one fixed in #13824.
@hysts hysts self-assigned this Sep 5, 2026
@hysts
hysts requested a lite review from Copilot September 5, 2026 02:09
@gradio-pr-bot

gradio-pr-bot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://huggingface.co/buckets/gradio/pypi-previews/resolve/fdc56fce172e6925e7cd862c119e75f1e227ee83/gradio-6.26.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@fdc56fce172e6925e7cd862c119e75f1e227ee83#subdirectory=client/python"

Import Gradio JS Client from this PR via CDN

import { Client } from "https://huggingface.co/buckets/gradio/npm-previews/resolve/fdc56fce172e6925e7cd862c119e75f1e227ee83/browser.js";

@gradio-pr-bot

Copy link
Copy Markdown
Collaborator

🦄 no changes detected

This Pull Request does not include changes to any packages.

__No changes detected. __



Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can create the changelog file directly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped to CI configuration and correctly limits continue-on-error to the intended matrix variants without impacting the primary test signal.

Pull request overview

Adjusts the python GitHub Actions workflow so the overall workflow/run status reflects failures in the primary backend test job, while still tolerating failures for explicitly “unreliable” matrix variants (flaky suite and Windows).

Changes:

  • Replaces job-level continue-on-error: true with a matrix-scoped condition.
  • Ensures ubuntu-latest + not flaky failures propagate to the workflow/run conclusion, improving signal on main pushes.
File summaries
File Description
.github/workflows/test-python.yml Scopes continue-on-error to flaky/Windows matrix entries so the main Ubuntu non-flaky job can fail the run.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hysts
hysts marked this pull request as ready for review September 5, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

continue-on-error: true on the python test job makes a failing backend job report green

3 participants